Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
How to handle 3rd party JS that doesn't support "old" browsers

I've confirmed a suspicion I've had that my website isn't working well in Android WebView. It turns out that starting at API 29 (Android 10) and earlier, it actually fails spectacularly, and this is caused by 3rd party JavaScript. For API 29 specifically, I can see the errors, and of course will report those back to the projects, but for 28 sometimes the entire browser crashes very early, so I can't even tell which particular piece of JS is causing the problem (I guess I can manually remove everything and add it back one piece at a time, but that's a project for another day).

These browsers represent at least 1/3rd of my traffic (and maybe much more, because I don't know what percentage is crashing before analytics start reporting), so it's a Must Fix problem.

Also, while I've been able to verify this for Android WebView, I strongly suspect it's happening for 3rd-party chromium browsers (e.g., MIUI, or Samsung browser).

Now, I'm running my own little bit of JS that is heavily involved in the loading of the other scripts, to improve performance, so I have really fine-grained control over what gets loaded, and when.

The question is, what's the preferred way of handling this? Do I check for something in userAgent and then conditionally load the scripts? That seems ... pretty fragile. I'm guessing there's some "industry standard" way of doing this, since it must be a pretty common problem that 3rd party code doesn't work in some random environments, and it's not as though Android 10 is that old.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda